412-fizz-buzz.py
problem: ---
problem:

Write a program that outputs the string representation of numbers from 1 to n.
But for multiples of three it should output “Fizz” instead of the number and for the multiples of five output 
“Buzz”. For numbers which are multiples of both three and five output “FizzBuzz”.

Example:

n = 15,

Return:
[
    "1",
    "2",
    "Fizz",
    "4",
    "Buzz",
    "Fizz",
    "7",
    "8",
    "Fizz",
    "Buzz",
    "11",
    "Fizz",
    "13",
    "14",
    "FizzBuzz"
]
---

-----------------------------------------------------------------------
bug_fixes: ---
bug_fixes:
Replace `range(1,n)` with `range(1,n+1)` on line 6. 
Replace `or` with `and` on line 8.
Add `return result` on line 16.
---

-----------------------------------------------------------------------
bug_desc: ---
bug_desc:
On line 6, the upper bound on the range function is n. This is incorrect behavior because the n-th value will be excluded from the range. To fix this, change the range from 1 to n+1.
On line 8, the if-condition check if i is divisible by 3 or 5. This is incorrect behavior because r3+r5 is appended if either is true. It should be appended if both are true.
On line 16, or after line 15, nothing is returned from the method, which is incorrect behavior. This is a syntactical mistake that can be resolved by returning result from the method.
---

-----------------------------------------------------------------------
line_no: ---
line_no:
6
---

-----------------------------------------------------------------------
buggy_code: ---
buggy_code:
1. class Solution:
2.     def fizzBuzz(self, n):
3.         result = []
4.         r5 = "Buzz"
5.         r3 = "Fizz"
6.         for i in range(1,n):
7.             print(i)
8.             if i % 3 == 0 or i % 5 ==0:
9.                 result.append(r3+r5)
10.             elif i % 3 == 0:
11.                 result.append(r3)
12.             elif i % 5 == 0:
13.                 result.append(r5)
14.             else:
15.                 result.append(str(i))
16. 
---

-----------------------------------------------------------------------
correct_code: ---
correct_code:
1. class Solution:
2.     def fizzBuzz(self, n):
3.         result = []
4.         r5 = "Buzz"
5.         r3 = "Fizz"
6.         for i in range(1,n+1):
7.             print(i)
8.             if i % 3 == 0 and i % 5 ==0:
9.                 result.append(r3+r5)
10.             elif i % 3 == 0:
11.                 result.append(r3)
12.             elif i % 5 == 0:
13.                 result.append(r5)
14.             else:
15.                 result.append(str(i))
16.         return result
17. 
---

-----------------------------------------------------------------------
